<?php
/**
 * In this File the class '\UF\IO\FileAlreadyExistsException' is defined.
 *
 * @category   UniKap-Framework
 * @package    IO
 * @subpackage Exceptions
 * @author     Ulf -UniKado- Kadner <ulfikado@gmail.com>
 * @since      2014-03-29 16:17
 * @version    0.1
 */

namespace UF\IO
{

    /**
     * This exception should be used, if a file does already exists.
     *
     * @since  v0.1
     */
    class FileAlreadyExistsException extends \UF\IO\Exception
    {

        # <editor-fold defaultstate="collapsed" desc="- - - >   C O N S T R U C T O R   - - - - - - - - - - - - - - - - - - - - - - - -">

        /**
         * Inits a new instance.
         *
         * @param  string     $file     The file
         * @param  string     $message  a optional error message
         * @param  int        $code     A optional error code (Defaults to \E_USER_ERROR)
         * @param  \Exception $previous A optional previous exceptions
         * @since  v0.1
         */
        public function __construct( $file, $message = null, $code = \E_USER_ERROR, \Exception $previous = null )
        {
            parent::__construct($file,
                \UF\_( '_io', 'File does allready exists.' ) .
                ( empty ( $message ) ? '' : ( "\n" . $message ) ), $code, $previous );
        }

        # </editor-fold>

    }

}

